# hi182x 测试构建文件

if build_tests
    test_hi182x_abi_sources = [
        '../../../../main.cpp',
        'test_hi182x_abi.cpp',
        'test_hi182x_card.cpp',
        'test_hi182x_port.cpp',
        'test_hi182x_om.cpp',
        '../../../../libraries/ncsi_over_mctp/mock_mctp.cpp',
    ] + chip_interface_sources + blockio_interface_sources

    test_hi182x_abi = executable(
        'test_hi182x_abi',
        test_hi182x_abi_sources,
        include_directories: [
            include_dirs,
            hisi_interface_inc,
            include_directories('../../../../drivers/pcie_nic_card/hisi'),
            include_directories('../../../../libraries'),
            include_directories('../../../../drivers'),
            include_directories('../../../../drivers/bus/i2c'),
            include_directories('../../../../drivers/bus/hisport'),
            include_directories('../../../../drivers/internal'),
            include_directories('../../../../drivers/chip'),
            include_directories('../../../../libraries/smbus'),
        ],
        dependencies: [
            gtest_dep,
            test_utilities_dep,
            test_utils_dep,
            dev_deps,
            hisi_182x_dep,
            libncsi_over_mctp_dep,
            libmctp_dep,
            libimu_dep,
            libsmbus_dep,
            ipmb_dep,
        ],
        link_whole: [internal_static_lib],
        link_args: ['-ldl'],
        install: false,
    )

    test('test_hi182x_abi', test_hi182x_abi,
         workdir: meson.build_root(),
         timeout: 180)
endif
